home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 15 Mar 1996 21:40:40 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4idk8oINNrr2@keats.ugrad.cs.ubc.ca>
- References: <00001a73+00002504@msn.com> <4ica32INN5hn@gambier.ugrad.cs.ubc.ca> <4icja9$1r92@saba.info.ucla.edu> <4idh80$6tj@solutions.solon.com>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4idh80$6tj@solutions.solon.com>,
- Peter Seebach <seebs@solutions.solon.com> wrote:
- >In article <4icja9$1r92@saba.info.ucla.edu>,
- >Jay Martin <jmartin@cs.ucla.edu> wrote:
- >>>Lex and Yacc are proven utilities that work.
- >
- >>Lex and Yacc are braindead crap along with C and Unix. Do they have an
- >>option to output Ada??
- >
- >Huh? I'm sorry, but you have *no* argument here. Lex and Yacc are brilliant;
- >they do *exactly* what they're supposed to do. What problems do you see
- >with them? (Reply by email, please, this is even less topical than usual.)
- >
- >Sure they have an option to output Ada. It's the one you're about to write,
- >if it's so useful. I have no need for it, so I'm not about to. It could
- >be done, of course - it's just not currently needed. :)
- >
- >>You have become and "idiot savant" at it, congratulations,
- >>unfortunately the next guy might not reading your code. I wasn't
- >>talking about needing a grammer, I was talking with about reading in a
- >>simple table. Its stupid to bring in two tools with two more
- >>"languages" to do something trivial that takes a page of normal code.
- >
- >Very few people would bring in yacc for just reading a table. I personally
- >would. My table parser would also support simple expression grammars. Could
- >you do that in a page of normal code, too? (Of course you could; you'd
- >use perl, and call eval.)
-
- I do too. I recently wrote a configuration file parser for a daemon I
- was hired to develop. Right now, it has a brain-dead syntax. However, it is
- robust with respect to comments and whitespace and deals with ".." strings,
- integer constants and identifiers properly.
-
- I used error productions in the yacc grammar to generate useful, friendly error
- messages that pinpoint a problem.
-
- I anticipate that the grammar will get more complicated when I add certain
- features; the parser/scanner will be a snap to update, compared to having to
- understand my own code. :)
-
- I didn't want to waste time writing this thing. I wanted a configuration file
- facility, NOW! Lex and yacc gave it to me, in minutes. And hey, regular
- expressiona and grammars _are_ more fun than switch() statements with numeric
- case labels... so punish me for enjoying the ``journey'' for its own sake!
- I'm glad I like my work!
-
- >Like all tools, lex and yacc are excellent for some tasks, and useless
- >for others. I can only assume you've been trying to use them for
- >inappropriate tasks, or more likely, that you haven't ever used them,
- >and that you're not familiar with C, either. You've posted many
- >claims, with *no* documentation, *no* examples, and *no* rationale.
-
- That trick allows an author to retreat infinitely without admitting he is
- wrong, because there is no wall to back into. ``But I never said this or
- that...''. Of course not. Didn't say a damn thing, in fact. Without the
- documentation, examples and whatnot, it is just *.advocacy fluff.
-
- >Most Ada advocates at least have points to make; you, sir, are a discredit
- >to Ada users. Hmph. "rabid language fanatics" indeed.
-
- On the contrary, I don't think he discredits anyone but himself. I'd hate to
- think that someone would consider some random C/UNIX fanatic to be a discredit
- to _me_. (Unless I _am_ that fanatic, of course :).
- --
-
-